//[问题1]:字符串传参后面不能接char类型变量
//[问题2]:用来存放字符串的数组的元素个数要比实际个数多一个,用来存放结束标志
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

#include "tlinklist.h"
#include "slinklist.h"

int main()
{
	/*
	tLink TL = Create_tLink();
	Insert_tLink(TL,15015228,"5501790ss","shizhilin","15968178611",0);
	Insert_tLink(TL,15015229,"5s01790ss","zhilin","15981878611",1);
	Insert_tLink(TL,15015230,"5501s90ss","shilin","22368178611",2);
	Travel_tLink(TL);

	tNode* node = Search_tLink(TL,15015230);
	printf("%d ",node->id);
	printf("%s ",node->password);
	printf("%s ",node->name);
	printf("%s ",node->phone);
	printf("%hhd \n",node->state);
	*/
	sLink SL = Create_sLink();
	Insert_sLink(SL,15015228,"shizhilin01","shizhilin","男","360428199509255534","15968178611",1);
	Insert_sLink(SL,15015229,"shizhilin02","zhangzhilin","女","555428199509255534","15968178600",0);
	Insert_sLink(SL,15015230,"shizhilin03","luzhilin","男","999428199509255534","15968178622",1);
	
	Travel_sLink(SL);
	
	Score_sLink(SL,15015228,85.5,89.5,56.4);
	Score_sLink(SL,15015229,75.5,92.5,57.4);
	Score_sLink(SL,15015230,65.5,56.5,90.4);

	Travel_sLink(SL);

	sResult SCR = Result_sLink(SL);//对成绩进行分析
	printf("单科最高分：%.2lf %.2lf %.2lf\n",SCR->CHScore,SCR->MHScore,SCR->EHScore);
	printf("单科平均分：%.2lf %.2lf %.2lf\n",SCR->CAScore,SCR->MAScore,SCR->EAScore);

	sNode* node = Search_sLink(SL,15015228);
	printf("%s\n",node->password);

	Sort_sLink(SL,SL->head,SL->tail,1);
	Travel_sLink(SL);
}
